<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="container-div">
	<div class="col-sm-12 select-info">
		<form id="menu-form">
			<div class="select-list">
				<ul>
					<li class="select-time">
						<label>当前余额： </label>
						<input type="text" class="time-input" id="begin" placeholder="请输入数字" name="begin"/>
						<span>-</span>
						<input type="text" class="time-input" id="end" placeholder="请输入数字" name="end"/>
					</li>
					<li style="display: flex;align-items: center;width: 180px;">
						<label style="min-width: 40px;margin-bottom: 0px;">用户：</label>
						<select name="userId" class="form-control" style="width: 100px">
							<option value="">请选择用户&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
							<option th:each="user:${users}" th:value="${user.userId}" th:text="${user.userName + '（' + user.loginName + '）'}"></option>
						</select>
					</li>
					<li>
						<label>部门：</label><input type="text" name="deptName" placeholder="请输入部门名称"/>
					</li>
					<li style="display: flex;align-items: center;">
						<input type="checkbox" name="isDelete" value="1"><span>显示已删除人员</span>
					</li>
					<li>
						<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
						<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
					</li>
				</ul>
			</div>
		</form>
	</div>
	<div class="col-sm-12 select-table table-striped">
		<table id="bootstrap-table" data-mobile-responsive="true"></table>
	</div>
</div>
<div th:include="include :: footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<script th:inline="javascript">
    var prefix = ctx + "finance/bill/money"

    $(function() {
        var options = {
            url: prefix + "/moneyList",
            modalName: "账户余额",
            search: false,
            columns: [{
                    field : 'userId',
                    title : '人员编号'
                },
                {
                    field : 'phonenumber',
                    title : '手机号码'
                },
                {
                    field : 'userName',
                    title : '姓名'
                },
                {
                    field : 'deptName',
                    title : '部门'
                },
                {
                    field : 'totalMoney',
                    title : '累计充值'
                },
                {
                    field : 'money',
                    title : '账户余额'
                },
                {
                    field : 'lastTime',
                    title : '最后充值时间'
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>